package www.wen.com.common.lib.util

import androidx.annotation.IdRes
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager

/**
 * @author WEN
 * @Description:
 * @date 2020/12/7 11:55
 */
object FragmentManager {

    fun switchFragment(
            manage: FragmentManager,
            showFragment: Fragment,
            hideFragment: Fragment,
            @IdRes containerViewId: Int
    ) {
        manage
                .beginTransaction()
                .add(containerViewId, showFragment)
                .commitAllowingStateLoss()
    }
}